package com.jcl.emessage.controller;

import com.jcl.core.resp.ApiResponse;
import com.jcl.emessage.core.vo.MailMessageVo;
import com.jcl.emessage.email.service.SendEmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ProducerController
 * @Description TODO
 * @Author yyliu
 * @Date 2018/11/12 17:00
 * @Version 1.0
 **/
@RestController
@RequestMapping("/emessage/email")
public class ProducerEmailController {

    @Autowired
    private SendEmailService sendEmailService;

    @RequestMapping("/send")
    public ApiResponse send(@RequestBody MailMessageVo mailMessageVo) {


        sendEmailService.sendHtmlMail(mailMessageVo);


        return ApiResponse.success("OK");
    }
}
